home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / comm / dlg / DLG_Correct_20.lha / DLG_PreCorrect.rexx < prev    next >
OS/2 REXX Batch file  |  1995-07-11  |  2KB  |  47 lines

  1. /*************************************************************************/
  2. /*                       DLG Correct / PDQ Export                        */
  3. /*                           Solution Fix v2.0                           */
  4. /*                                                                       */
  5. /*                          Pre-Process Module                           */
  6. /*                                                                       */
  7. /*                    Created by Jon Godfrey (RE0273)                    */
  8. /*             Fido: 1:212/1005   INet: jdgodfre@slonet.org              */
  9. /*************************************************************************/
  10.  
  11. parse arg arg_list
  12. parse var arg_list uname port area msgnum
  13. uname=strip(uname,b) ;port=strip(port,b); area=strip(area,b); msgnum=strip(msgnum,b)
  14.  
  15. no_filenote_flag = 0
  16.  
  17. tempfile = 't:dlg_correct.'||port
  18. delete_tempfile = 'c:delete >NIL: '||tempfile
  19.  
  20. filenote_file = 't:filenote.'||port
  21.  
  22. if area=="PVT" then
  23.    msg_path = 'USER:'||uname||'/'||msgnum||'.msg'
  24. else
  25.    msg_path = 'MSG:'||area||'/'||msgnum||'.msg'
  26.  
  27. list_msg_info = 'c:list >'||tempfile||' '||msg_path||' nohead'
  28. address command list_msg_info
  29.  
  30. call open(fn,tempfile,R)
  31.    filename = readln(fn)
  32.    filenote = readln(fn)
  33.    if eof(fn) = 1 then no_filenote_flag = 1
  34. call close(fn)
  35.  
  36. address command delete_tempfile
  37.  
  38. if no_filenote_flag = 0 then do
  39.    filenote = right(filenote,length(filenote)-2)
  40.    call open(note,filenote_file,W)
  41.       writeln(note,msg_path)
  42.       writeln(note,filenote)
  43.    call close(note)
  44. end
  45.  
  46. exit
  47.